<?php $this->_extends('_layouts/default_layout'); ?>

<?php $this->_block('title'); ?><?= $title ?><?php $this->_endblock(); ?>
<?php $this->_block('js'); ?>
<script type="text/javascript">
    $(function() {
        $('#btnSave').click(function() {
            $('#mainForm').submit();
        });
    });
</script>
<?php $this->_endblock('js'); ?>

<?php $this->_block('css'); ?>
<style type="text/css">
    .tips {
        font-size: 12px;
        font-weight: normal;
    }

    label {
        font-size: 14px;
        display: inline;
    }

    label.mainLabel{
        display: block;
        font-weight: bold;
    }
</style>
<?php $this->_endblock('css'); ?>

<?php $this->_block('actionBar'); ?>
<button id=btnSave>保存更改</button>
<?php $this->_endblock('actionBar'); ?>

<?php $this->_block('contents'); ?>

<form id="mainForm" action="<?=url('/addressEdit')?>" method="post">
    <input type="hidden" name="aid" value="<?=$a->id()?>">

    <? if (isset($errorMsg)): ?>
    <div class="error"><?=$errorMsg?></div>
    <? endif ?>

    <label for="address" class="mainLabel">邮箱地址 <span class="require">*</span></label>
    <input name="address" id="address" value="<?=$a->address?>" size="40"/>

    <label for="customer_name" class="mainLabel">
        称呼
    </label>
    <input name="customer_name" id="customer_name" value="<?=$a->customer_name?>" size="40"/>

</form>

<?php $this->_endblock(); ?>